<script setup>
import axios from "axios";
import { GETNOBASE } from "@/api";
import { useMapStore } from "@/stores/map.js";
import InfoLayer from "@/components/InfoLayer.vue";
const { proxy } = getCurrentInstance();
const infoLayerRef = ref();
const mapStore = useMapStore();
onMounted(() => {
    setTimeout(() => {
        mapStore.initMyMap();
        // 地图添加点击事件，点击某点，添加自定义信息弹窗
        infoLayerRef.value.addCustOverlay();
        resetMapSize();
        proxy.$hideLoading();
    }, 1300);
});

const resetMapSize = () => {
    document.getElementById("map_container").style.transform = `scale(${
        1 / mapStore.seenScale
    }) translateZ(0) translate3d(0, 0, 0)`;
};
</script>

<template>
    <div id="map_container"></div>
    <InfoLayer ref="infoLayerRef" />
</template>
<style scoped>
#map_container {
    width: 100%;
    height: 100%;
}
</style>
